<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>移动端适配测试</title>
    <style>
        body {
            margin: 0;
            font-family: system-ui, -apple-system, sans-serif;
        }
        .test-container {
            max-width: 400px;
            margin: 0 auto;
            padding: 20px;
        }
        .screen-size {
            background: #f0f0f0;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 20px;
            text-align: center;
        }
        .nav-test {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 56px;
            background: white;
            display: flex;
            border-top: 1px solid #ccc;
            padding: 0 10px;
        }
        .nav-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: #666;
        }
        .nav-item.active {
            color: #ff4e50;
        }
        @media (min-width: 769px) {
            .nav-test {
                display: none;
            }
        }
    </style>
</head>
<body>
    <div class="test-container">
        <div class="screen-size">
            <h2>当前屏幕尺寸</h2>
            <p>宽度: <span id="width">0</span>px</p>
            <p>高度: <span id="height">0</span>px</p>
            <p>设备像素比: <span id="dpr">1</span></p>
        </div>
        
        <div>
            <h3>测试说明：</h3>
            <ul>
                <li>当屏幕宽度小于769px时，底部导航应该显示</li>
                <li>当屏幕宽度大于等于769px时，底部导航应该隐藏</li>
                <li>调整浏览器窗口大小测试响应式效果</li>
            </ul>
        </div>
    </div>

    <div class="nav-test">
        <div class="nav-item active">首页</div>
        <div class="nav-item">收藏</div>
        <div class="nav-item">购物车</div>
        <div class="nav-item">我的</div>
    </div>

    <script>
        function updateSize() {
            document.getElementById('width').textContent = window.innerWidth;
            document.getElementById('height').textContent = window.innerHeight;
            document.getElementById('dpr').textContent = window.devicePixelRatio;
        }
        window.addEventListener('resize', updateSize);
        updateSize();
    </script>
</body>
</html>
